.class public Lcom/waiqin365/lightapp/im/adapter/bk;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:Ljava/lang/String;

.field private b:Ljava/lang/String;

.field private c:Ljava/lang/String;

.field private d:Landroid/view/LayoutInflater;

.field private e:Landroid/app/Activity;

.field private f:Lcom/hyphenate/chat/EMConversation;

.field private g:Landroid/content/Context;

.field private h:Ljava/util/Map;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    new-instance v0, Ljava/util/Hashtable;

    invoke-direct {v0}, Ljava/util/Hashtable;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->h:Ljava/util/Map;

    iput-object p2, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->a:Ljava/lang/String;

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    iput-object p4, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->b:Ljava/lang/String;

    iput-object p5, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->c:Ljava/lang/String;

    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    check-cast p1, Landroid/app/Activity;

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->e:Landroid/app/Activity;

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v0

    invoke-virtual {v0, p2}, Lcom/hyphenate/chat/EMChatManager;->getConversation(Ljava/lang/String;)Lcom/hyphenate/chat/EMConversation;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/adapter/bk;)Landroid/app/Activity;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->e:Landroid/app/Activity;

    return-object v0
.end method

.method private a(Lcom/hyphenate/chat/EMMessage;I)Landroid/view/View;
    .locals 3

    const/4 v2, 0x0

    sget-object v0, Lcom/waiqin365/lightapp/im/adapter/ci;->a:[I

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Type;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    const-string/jumbo v0, "is_notification"

    const/4 v1, 0x0

    invoke-virtual {p1, v0, v1}, Lcom/hyphenate/chat/EMMessage;->getBooleanAttribute(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f030173

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    :goto_0
    return-object v0

    :pswitch_0
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f030177

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f03017e

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    :pswitch_1
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f030179

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f030180

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    :pswitch_2
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_2

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f030178

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f03017f

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    :pswitch_3
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_3

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f030174

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    :cond_3
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f03017b

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    :cond_4
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_5

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f030176

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto/16 :goto_0

    :cond_5
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->d:Landroid/view/LayoutInflater;

    const v1, 0x7f03017d

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method

.method public static a(Ljava/lang/String;)Ljava/lang/String;
    .locals 4

    const-string/jumbo v0, "/"

    invoke-virtual {p0, v0}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/hyphenate/util/PathUtil;->getInstance()Lcom/hyphenate/util/PathUtil;

    move-result-object v2

    invoke-virtual {v2}, Lcom/hyphenate/util/PathUtil;->getImagePath()Ljava/io/File;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, "/"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, "th"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "msg"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v3, "thum image path:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/hyphenate/util/EMLog;->d(Ljava/lang/String;Ljava/lang/String;)V

    return-object v0
.end method

.method public static a(Landroid/widget/TextView;Landroid/content/Context;Ljava/lang/String;Landroid/view/View;)V
    .locals 9

    const/4 v3, 0x0

    if-eqz p0, :cond_0

    invoke-virtual {p0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    instance-of v0, v0, Landroid/text/Spannable;

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    check-cast v0, Landroid/text/Spannable;

    invoke-interface {v0}, Landroid/text/Spannable;->length()I

    move-result v1

    const-class v2, Landroid/text/style/URLSpan;

    invoke-interface {v0, v3, v1, v2}, Landroid/text/Spannable;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [Landroid/text/style/URLSpan;

    if-eqz v1, :cond_0

    array-length v2, v1

    if-lez v2, :cond_0

    array-length v4, v1

    move v2, v3

    :goto_0
    if-ge v2, v4, :cond_0

    aget-object v5, v1, v2

    invoke-interface {v0, v5}, Landroid/text/Spannable;->getSpanStart(Ljava/lang/Object;)I

    move-result v6

    invoke-interface {v0, v5}, Landroid/text/Spannable;->getSpanEnd(Ljava/lang/Object;)I

    move-result v7

    invoke-interface {v0, v5}, Landroid/text/Spannable;->removeSpan(Ljava/lang/Object;)V

    new-instance v8, Lcom/waiqin365/lightapp/im/utils/URLSpanUtil;

    invoke-virtual {v5}, Landroid/text/style/URLSpan;->getURL()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v8, v5, p1, p2, p3}, Lcom/waiqin365/lightapp/im/utils/URLSpanUtil;-><init>(Ljava/lang/String;Landroid/content/Context;Ljava/lang/String;Landroid/view/View;)V

    invoke-interface {v0, v8, v6, v7, v3}, Landroid/text/Spannable;->setSpan(Ljava/lang/Object;III)V

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method private a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;I)V
    .locals 6

    const/4 v3, 0x1

    const/4 v5, 0x0

    const/16 v4, 0x8

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMTextMessageBody;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMTextMessageBody;->getMessage()Ljava/lang/String;

    move-result-object v0

    const v2, 0x3f19999a    # 0.6f

    invoke-static {v1, v0, v2}, Lcom/waiqin365/lightapp/im/utils/SmileUtils;->getSmiledText(Landroid/content/Context;Ljava/lang/CharSequence;F)Landroid/text/Spannable;

    move-result-object v0

    iget-object v1, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    sget-object v2, Landroid/widget/TextView$BufferType;->SPANNABLE:Landroid/widget/TextView$BufferType;

    invoke-virtual {v1, v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "_"

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, ""

    array-length v1, v0

    if-le v1, v3, :cond_1

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-static {v1}, Lcom/waiqin365/base/db/offlinedata/m;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/m;

    move-result-object v1

    aget-object v0, v0, v3

    invoke-virtual {v1, v0}, Lcom/waiqin365/base/db/offlinedata/m;->f(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    move-object v1, v0

    :goto_0
    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->e:Landroid/app/Activity;

    check-cast v0, Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->a:Landroid/widget/ListView;

    invoke-static {v2, v3, v1, v0}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Landroid/widget/TextView;Landroid/content/Context;Ljava/lang/String;Landroid/view/View;)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/cl;

    invoke-direct {v1, p0, p3}, Lcom/waiqin365/lightapp/im/adapter/cl;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;I)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->SEND:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_0

    sget-object v0, Lcom/waiqin365/lightapp/im/adapter/ci;->b:[I

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Status;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    invoke-virtual {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    :cond_0
    :goto_1
    return-void

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->a:Ljava/lang/String;

    move-object v1, v0

    goto :goto_0

    :pswitch_0
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    :pswitch_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    :pswitch_2
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v5}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method private a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V
    .locals 7

    const v3, 0x7f0201ba

    const/4 v6, 0x1

    const/4 v5, 0x0

    const/16 v4, 0x8

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setTag(Ljava/lang/Object;)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/cm;

    invoke-direct {v1, p0, p3}, Lcom/waiqin365/lightapp/im/adapter/cm;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;I)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_4

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMImageMessageBody;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMImageMessageBody;->thumbnailDownloadStatus()Lcom/hyphenate/chat/EMFileMessageBody$EMDownloadStatus;

    move-result-object v1

    sget-object v2, Lcom/hyphenate/chat/EMFileMessageBody$EMDownloadStatus;->DOWNLOADING:Lcom/hyphenate/chat/EMFileMessageBody$EMDownloadStatus;

    if-eq v1, v2, :cond_0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMImageMessageBody;->thumbnailDownloadStatus()Lcom/hyphenate/chat/EMFileMessageBody$EMDownloadStatus;

    move-result-object v1

    sget-object v2, Lcom/hyphenate/chat/EMFileMessageBody$EMDownloadStatus;->PENDING:Lcom/hyphenate/chat/EMFileMessageBody$EMDownloadStatus;

    if-ne v1, v2, :cond_2

    :cond_0
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->b(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/cn;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/adapter/cn;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;)V

    const-wide/16 v2, 0x7d0

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    :cond_1
    :goto_0
    return-void

    :cond_2
    iget-object v1, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v1, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v1, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v1, v4}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v1, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMImageMessageBody;->thumbnailLocalPath()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_3

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMImageMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    :cond_3
    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMImageMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v1, v2, v0, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Ljava/lang/String;Landroid/widget/ImageView;Ljava/lang/String;Lcom/hyphenate/chat/EMMessage;)Z

    goto :goto_0

    :cond_4
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMImageMessageBody;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMImageMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_5

    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_5

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/utils/k;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-direct {p0, v0, v2, v1, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Ljava/lang/String;Landroid/widget/ImageView;Ljava/lang/String;Lcom/hyphenate/chat/EMMessage;)Z

    :goto_1
    sget-object v0, Lcom/waiqin365/lightapp/im/adapter/ci;->b:[I

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Status;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->c(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    goto :goto_0

    :cond_5
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMImageMessageBody;->thumbnailLocalPath()Ljava/lang/String;

    move-result-object v2

    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_6

    iget-object v1, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMImageMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v2, v1, v0, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Ljava/lang/String;Landroid/widget/ImageView;Ljava/lang/String;Lcom/hyphenate/chat/EMMessage;)Z

    goto :goto_1

    :cond_6
    invoke-static {v1}, Lcom/waiqin365/lightapp/im/utils/k;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-direct {p0, v0, v2, v1, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Ljava/lang/String;Landroid/widget/ImageView;Ljava/lang/String;Lcom/hyphenate/chat/EMMessage;)Z

    goto :goto_1

    :pswitch_0
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v4}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    check-cast v0, Lcom/waiqin365/lightapp/view/MaskImage;

    invoke-virtual {v0, v5}, Lcom/waiqin365/lightapp/view/MaskImage;->setCover(Z)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    goto/16 :goto_0

    :pswitch_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v4}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    check-cast v0, Lcom/waiqin365/lightapp/view/MaskImage;

    invoke-virtual {v0, v6}, Lcom/waiqin365/lightapp/view/MaskImage;->setCover(Z)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setVisibility(I)V

    goto/16 :goto_0

    :pswitch_2
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v5}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v5}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    check-cast v0, Lcom/waiqin365/lightapp/view/MaskImage;

    invoke-virtual {v0, v6}, Lcom/waiqin365/lightapp/view/MaskImage;->setCover(Z)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->h:Ljava/util/Map;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    new-instance v0, Ljava/util/Timer;

    invoke-direct {v0}, Ljava/util/Timer;-><init>()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->h:Ljava/util/Map;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/co;

    invoke-direct {v1, p0, p2, p1, v0}, Lcom/waiqin365/lightapp/im/adapter/co;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/waiqin365/lightapp/im/adapter/cs;Lcom/hyphenate/chat/EMMessage;Ljava/util/Timer;)V

    const-wide/16 v2, 0x0

    const-wide/16 v4, 0x1f4

    invoke-virtual/range {v0 .. v5}, Ljava/util/Timer;->schedule(Ljava/util/TimerTask;JJ)V

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->d(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    return-void
.end method

.method private a(Ljava/lang/String;Landroid/widget/ImageView;Ljava/lang/String;Lcom/hyphenate/chat/EMMessage;)Z
    .locals 5

    const/4 v4, 0x1

    invoke-static {}, Lcom/waiqin365/lightapp/im/utils/i;->a()Lcom/waiqin365/lightapp/im/utils/i;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/waiqin365/lightapp/im/utils/i;->a(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/utils/a;->b(Landroid/graphics/Bitmap;Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {p2, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {p2, v4}, Landroid/widget/ImageView;->setClickable(Z)V

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/ch;

    invoke-direct {v0, p0, p4}, Lcom/waiqin365/lightapp/im/adapter/ch;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/chat/EMMessage;)V

    invoke-virtual {p2, v0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    :goto_0
    return v4

    :cond_0
    new-instance v0, Lcom/waiqin365/lightapp/im/b/a;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/im/b/a;-><init>()V

    const/4 v1, 0x7

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    aput-object p1, v1, v2

    aput-object p3, v1, v4

    const/4 v2, 0x2

    invoke-virtual {p4}, Lcom/hyphenate/chat/EMMessage;->getChatType()Lcom/hyphenate/chat/EMMessage$ChatType;

    move-result-object v3

    aput-object v3, v1, v2

    const/4 v2, 0x3

    aput-object p2, v1, v2

    const/4 v2, 0x4

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->e:Landroid/app/Activity;

    aput-object v3, v1, v2

    const/4 v2, 0x5

    aput-object p4, v1, v2

    const/4 v2, 0x6

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    aput-object v3, v1, v2

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/b/a;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto :goto_0
.end method

.method static synthetic b(Lcom/waiqin365/lightapp/im/adapter/bk;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    return-object v0
.end method

.method private b(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V
    .locals 3

    const/4 v2, 0x0

    sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream;

    const-string/jumbo v1, "!!! show download image progress"

    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/by;

    invoke-direct {v0, p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/by;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    invoke-virtual {p1, v0}, Lcom/hyphenate/chat/EMMessage;->setMessageStatusCallback(Lcom/hyphenate/EMCallBack;)V

    return-void
.end method

.method private b(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;I)V
    .locals 2

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMTextMessageBody;

    iget-object v1, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMTextMessageBody;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method private b(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V
    .locals 8

    const-wide/16 v2, 0x0

    const v7, 0x7f0201ba

    const/16 v6, 0x8

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMVideoMessageBody;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getLocalThumb()Ljava/lang/String;

    move-result-object v1

    iget-object v4, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    new-instance v5, Lcom/waiqin365/lightapp/im/adapter/cq;

    invoke-direct {v5, p0, p3}, Lcom/waiqin365/lightapp/im/adapter/cq;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;I)V

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    if-eqz v1, :cond_0

    iget-object v4, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getThumbnailUrl()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, v1, v4, v5, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->b(Ljava/lang/String;Landroid/widget/ImageView;Ljava/lang/String;Lcom/hyphenate/chat/EMMessage;)V

    :cond_0
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getDuration()I

    move-result v4

    if-lez v4, :cond_1

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getDuration()I

    move-result v4

    invoke-static {v4}, Lcom/hyphenate/util/DateUtils;->toTimeBySecond(I)Ljava/lang/String;

    move-result-object v4

    iget-object v5, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->h:Landroid/widget/TextView;

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_1
    iget-object v4, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->g:Landroid/widget/ImageView;

    const v5, 0x7f02024b

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setImageResource(I)V

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v4

    sget-object v5, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v4, v5, :cond_4

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getVideoFileLength()J

    move-result-wide v4

    cmp-long v4, v4, v2

    if-lez v4, :cond_2

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getVideoFileLength()J

    move-result-wide v4

    invoke-static {v4, v5}, Lcom/hyphenate/util/TextFormater;->getDataSize(J)Ljava/lang/String;

    move-result-object v4

    iget-object v5, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->i:Landroid/widget/TextView;

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_2
    :goto_0
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v4

    sget-object v5, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v4, v5, :cond_6

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v2

    sget-object v3, Lcom/hyphenate/chat/EMMessage$Status;->INPROGRESS:Lcom/hyphenate/chat/EMMessage$Status;

    if-ne v2, v3, :cond_5

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v0, v7}, Landroid/widget/ImageView;->setImageResource(I)V

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->b(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    :cond_3
    :goto_1
    return-void

    :cond_4
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v4

    if-eqz v4, :cond_2

    new-instance v4, Ljava/io/File;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4}, Ljava/io/File;->exists()Z

    move-result v4

    if-eqz v4, :cond_2

    new-instance v4, Ljava/io/File;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4}, Ljava/io/File;->length()J

    move-result-wide v4

    invoke-static {v4, v5}, Lcom/hyphenate/util/TextFormater;->getDataSize(J)Ljava/lang/String;

    move-result-object v4

    iget-object v5, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->i:Landroid/widget/TextView;

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    :cond_5
    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v2, v7}, Landroid/widget/ImageView;->setImageResource(I)V

    if-eqz v1, :cond_3

    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMVideoMessageBody;->getThumbnailUrl()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v1, v2, v0, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->b(Ljava/lang/String;Landroid/widget/ImageView;Ljava/lang/String;Lcom/hyphenate/chat/EMMessage;)V

    goto :goto_1

    :cond_6
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setTag(Ljava/lang/Object;)V

    sget-object v0, Lcom/waiqin365/lightapp/im/adapter/ci;->b:[I

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Status;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->c(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    goto :goto_1

    :pswitch_0
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v6}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v6}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v6}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_1

    :pswitch_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v6}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v6}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    :pswitch_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->h:Ljava/util/Map;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_3

    new-instance v0, Ljava/util/Timer;

    invoke-direct {v0}, Ljava/util/Timer;-><init>()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->h:Ljava/util/Map;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v4

    invoke-interface {v1, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/bm;

    invoke-direct {v1, p0, p2, p1, v0}, Lcom/waiqin365/lightapp/im/adapter/bm;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/waiqin365/lightapp/im/adapter/cs;Lcom/hyphenate/chat/EMMessage;Ljava/util/Timer;)V

    const-wide/16 v4, 0x1f4

    invoke-virtual/range {v0 .. v5}, Ljava/util/Timer;->schedule(Ljava/util/TimerTask;JJ)V

    goto/16 :goto_1

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method private b(Ljava/lang/String;Landroid/widget/ImageView;Ljava/lang/String;Lcom/hyphenate/chat/EMMessage;)V
    .locals 4

    invoke-static {}, Lcom/waiqin365/lightapp/im/utils/i;->a()Lcom/waiqin365/lightapp/im/utils/i;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/waiqin365/lightapp/im/utils/i;->a(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    if-eqz v0, :cond_0

    :goto_0
    return-void

    :cond_0
    new-instance v0, Lcom/waiqin365/lightapp/im/b/d;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/im/b/d;-><init>()V

    const/4 v1, 0x6

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    aput-object p1, v1, v2

    const/4 v2, 0x1

    aput-object p3, v1, v2

    const/4 v2, 0x2

    aput-object p2, v1, v2

    const/4 v2, 0x3

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->e:Landroid/app/Activity;

    aput-object v3, v1, v2

    const/4 v2, 0x4

    aput-object p4, v1, v2

    const/4 v2, 0x5

    aput-object p0, v1, v2

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/b/d;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto :goto_0
.end method

.method static synthetic c(Lcom/waiqin365/lightapp/im/adapter/bk;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->c:Ljava/lang/String;

    return-object v0
.end method

.method private c(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V
    .locals 2

    :try_start_0
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getTo()Ljava/lang/String;

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    const-string/jumbo v1, "0%"

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    check-cast v0, Lcom/waiqin365/lightapp/view/MaskImage;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/view/MaskImage;->setCover(Z)V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/hyphenate/chat/EMChatManager;->sendMessage(Lcom/hyphenate/chat/EMMessage;)V

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/cb;

    invoke-direct {v0, p0, p2}, Lcom/waiqin365/lightapp/im/adapter/cb;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    invoke-virtual {p1, v0}, Lcom/hyphenate/chat/EMMessage;->setMessageStatusCallback(Lcom/hyphenate/EMCallBack;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method private c(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V
    .locals 10

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    move-object v8, v0

    check-cast v8, Lcom/hyphenate/chat/EMVoiceMessageBody;

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v8}, Lcom/hyphenate/chat/EMVoiceMessageBody;->getLength()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, "\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v9, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/ct;

    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    iget-object v3, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->l:Landroid/widget/ImageView;

    iget-object v5, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->e:Landroid/app/Activity;

    iget-object v6, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->a:Ljava/lang/String;

    iget-object v7, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    move-object v1, p1

    move-object v4, p0

    invoke-direct/range {v0 .. v7}, Lcom/waiqin365/lightapp/im/adapter/ct;-><init>(Lcom/hyphenate/chat/EMMessage;Landroid/widget/ImageView;Landroid/widget/ImageView;Landroid/widget/BaseAdapter;Landroid/app/Activity;Ljava/lang/String;Lcom/hyphenate/chat/EMConversation;)V

    invoke-virtual {v9, v0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/bo;

    invoke-direct {v1, p0, p3}, Lcom/waiqin365/lightapp/im/adapter/bo;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;I)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    invoke-virtual {v8}, Lcom/hyphenate/chat/EMVoiceMessageBody;->getLength()I

    move-result v0

    const/16 v1, 0xa

    if-ge v0, v1, :cond_0

    invoke-virtual {v8}, Lcom/hyphenate/chat/EMVoiceMessageBody;->getLength()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    mul-int/lit8 v0, v0, 0x5

    add-int/lit8 v1, v0, 0x49

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    int-to-float v1, v1

    invoke-static {v2, v1}, Lcom/fiberhome/gaea/client/d/k;->a(Landroid/content/Context;F)I

    move-result v1

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->width:I

    iget-object v1, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    :goto_0
    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_3

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->isListened()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->l:Landroid/widget/ImageView;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    :goto_1
    sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream;

    const-string/jumbo v1, "it is receive msg"

    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Status;->INPROGRESS:Lcom/hyphenate/chat/EMMessage$Status;

    if-ne v0, v1, :cond_2

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream;

    const-string/jumbo v1, "!!!! back receive"

    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/bp;

    invoke-direct {v0, p0, p2}, Lcom/waiqin365/lightapp/im/adapter/bp;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    invoke-virtual {p1, v0}, Lcom/hyphenate/chat/EMMessage;->setMessageStatusCallback(Lcom/hyphenate/EMCallBack;)V

    :goto_2
    return-void

    :cond_0
    invoke-virtual {v8}, Lcom/hyphenate/chat/EMVoiceMessageBody;->getLength()I

    move-result v0

    div-int/lit8 v0, v0, 0xa

    mul-int/lit8 v0, v0, 0x5

    add-int/lit8 v1, v0, 0x76

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    int-to-float v1, v1

    invoke-static {v2, v1}, Lcom/fiberhome/gaea/client/d/k;->a(Landroid/content/Context;F)I

    move-result v1

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->width:I

    iget-object v1, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_0

    :cond_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->l:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    :cond_2
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    goto :goto_2

    :cond_3
    sget-object v0, Lcom/waiqin365/lightapp/im/adapter/ci;->b:[I

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Status;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    invoke-virtual {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    goto :goto_2

    :pswitch_0
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_2

    :pswitch_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_2

    :pswitch_2
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_2

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method static synthetic d(Lcom/waiqin365/lightapp/im/adapter/bk;)Lcom/hyphenate/chat/EMConversation;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    return-object v0
.end method

.method private d(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->e:Landroid/app/Activity;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/cg;

    invoke-direct {v1, p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/cg;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method private d(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V
    .locals 7

    const/4 v6, 0x4

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMNormalFileMessageBody;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMNormalFileMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->o:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMNormalFileMessageBody;->getFileName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->p:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMNormalFileMessageBody;->getFileSize()J

    move-result-wide v4

    invoke-static {v4, v5}, Lcom/hyphenate/util/TextFormater;->getDataSize(J)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v2, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->k:Landroid/widget/LinearLayout;

    new-instance v3, Lcom/waiqin365/lightapp/im/adapter/bs;

    invoke-direct {v3, p0, v1, v0, p1}, Lcom/waiqin365/lightapp/im/adapter/bs;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Ljava/lang/String;Lcom/hyphenate/chat/EMNormalFileMessageBody;Lcom/hyphenate/chat/EMMessage;)V

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v2, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v2, :cond_2

    sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream;

    const-string/jumbo v2, "it is receive msg"

    invoke-virtual {v0, v2}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    new-instance v0, Ljava/io/File;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    if-eqz v0, :cond_1

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->q:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    const v2, 0x7f0802a7

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->q:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    const v2, 0x7f0802a8

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    :cond_2
    sget-object v0, Lcom/waiqin365/lightapp/im/adapter/ci;->b:[I

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Status;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    invoke-virtual {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    :goto_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->k:Landroid/widget/LinearLayout;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/bv;

    invoke-direct {v1, p0, p3}, Lcom/waiqin365/lightapp/im/adapter/bv;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;I)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    goto :goto_0

    :pswitch_0
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v6}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v6}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v6}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    :pswitch_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v6}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v6}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    :pswitch_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->h:Ljava/util/Map;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    new-instance v0, Ljava/util/Timer;

    invoke-direct {v0}, Ljava/util/Timer;-><init>()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->h:Ljava/util/Map;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/bt;

    invoke-direct {v1, p0, p2, p1, v0}, Lcom/waiqin365/lightapp/im/adapter/bt;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/waiqin365/lightapp/im/adapter/cs;Lcom/hyphenate/chat/EMMessage;Ljava/util/Timer;)V

    const-wide/16 v2, 0x0

    const-wide/16 v4, 0x1f4

    invoke-virtual/range {v0 .. v5}, Ljava/util/Timer;->schedule(Ljava/util/TimerTask;JJ)V

    goto :goto_1

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method private e(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V
    .locals 10

    const/4 v9, 0x0

    const/16 v8, 0x8

    const v0, 0x7f0c084a

    invoke-virtual {p4, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v1

    check-cast v1, Lcom/hyphenate/chat/EMLocationMessageBody;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMLocationMessageBody;->getAddress()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    new-instance v2, Lcom/hyphenate/util/LatLng;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMLocationMessageBody;->getLatitude()D

    move-result-wide v4

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMLocationMessageBody;->getLongitude()D

    move-result-wide v6

    invoke-direct {v2, v4, v5, v6, v7}, Lcom/hyphenate/util/LatLng;-><init>(DD)V

    new-instance v3, Lcom/waiqin365/lightapp/im/adapter/cr;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMLocationMessageBody;->getAddress()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v3, p0, v2, v1}, Lcom/waiqin365/lightapp/im/adapter/cr;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/util/LatLng;Ljava/lang/String;)V

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/bw;

    invoke-direct {v1, p0, p3}, Lcom/waiqin365/lightapp/im/adapter/bw;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;I)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_0

    :goto_0
    return-void

    :cond_0
    sget-object v0, Lcom/waiqin365/lightapp/im/adapter/ci;->b:[I

    invoke-virtual {p1}, Lcom/hyphenate/chat/EMMessage;->status()Lcom/hyphenate/chat/EMMessage$Status;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Status;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    invoke-virtual {p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    goto :goto_0

    :pswitch_0
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v8}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v8}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_0

    :pswitch_1
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v8}, Landroid/widget/ProgressBar;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, v9}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_0

    :pswitch_2
    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v9}, Landroid/widget/ProgressBar;->setVisibility(I)V

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method


# virtual methods
.method public a(I)Lcom/hyphenate/chat/EMMessage;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMConversation;->getAllMessages()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    return-object v0
.end method

.method public a()V
    .locals 0

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/adapter/bk;->notifyDataSetChanged()V

    return-void
.end method

.method public a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V
    .locals 2

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v0, p2, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/hyphenate/chat/EMChatManager;->sendMessage(Lcom/hyphenate/chat/EMMessage;)V

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/bx;

    invoke-direct {v0, p0, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bx;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;)V

    invoke-virtual {p1, v0}, Lcom/hyphenate/chat/EMMessage;->setMessageStatusCallback(Lcom/hyphenate/EMCallBack;)V

    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMConversation;->getAllMessages()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public synthetic getItem(I)Ljava/lang/Object;
    .locals 1

    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(I)Lcom/hyphenate/chat/EMMessage;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getItemViewType(I)I
    .locals 4

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMConversation;->getAllMessages()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v2

    sget-object v3, Lcom/hyphenate/chat/EMMessage$Type;->TXT:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v2, v3, :cond_4

    const-string/jumbo v2, "is_voice_call"

    invoke-virtual {v0, v2, v1}, Lcom/hyphenate/chat/EMMessage;->getBooleanAttribute(Ljava/lang/String;Z)Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v2, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v2, :cond_0

    move v0, v1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0

    :cond_1
    const-string/jumbo v2, "is_notification"

    invoke-virtual {v0, v2, v1}, Lcom/hyphenate/chat/EMMessage;->getBooleanAttribute(Ljava/lang/String;Z)Z

    move-result v1

    if-eqz v1, :cond_2

    const/16 v0, 0xe

    goto :goto_0

    :cond_2
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_3

    const/16 v0, 0xd

    goto :goto_0

    :cond_3
    const/16 v0, 0xc

    goto :goto_0

    :cond_4
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v1

    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->IMAGE:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v1, v2, :cond_6

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_5

    const/4 v0, 0x5

    goto :goto_0

    :cond_5
    const/4 v0, 0x2

    goto :goto_0

    :cond_6
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v1

    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->LOCATION:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v1, v2, :cond_8

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_7

    const/4 v0, 0x4

    goto :goto_0

    :cond_7
    const/4 v0, 0x3

    goto :goto_0

    :cond_8
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v1

    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->VOICE:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v1, v2, :cond_a

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_9

    const/4 v0, 0x7

    goto :goto_0

    :cond_9
    const/4 v0, 0x6

    goto :goto_0

    :cond_a
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v1

    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->VIDEO:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v1, v2, :cond_c

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_b

    const/16 v0, 0x9

    goto :goto_0

    :cond_b
    const/16 v0, 0x8

    goto :goto_0

    :cond_c
    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v1

    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->FILE:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v1, v2, :cond_e

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_d

    const/16 v0, 0xb

    goto/16 :goto_0

    :cond_d
    const/16 v0, 0xa

    goto/16 :goto_0

    :cond_e
    const/4 v0, -0x1

    goto/16 :goto_0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 10

    const/4 v9, 0x1

    const v7, 0x7f0c085c

    const/4 v8, 0x0

    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(I)Lcom/hyphenate/chat/EMMessage;

    move-result-object v3

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v0

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getChatType()Lcom/hyphenate/chat/EMMessage$ChatType;

    move-result-object v4

    if-nez p2, :cond_7

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/cs;

    invoke-direct {v1}, Lcom/waiqin365/lightapp/im/adapter/cs;-><init>()V

    invoke-direct {p0, v3, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Lcom/hyphenate/chat/EMMessage;I)Landroid/view/View;

    move-result-object p2

    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->IMAGE:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v0, v2, :cond_2

    const v0, 0x7f0c084d

    :try_start_0
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    const v0, 0x7f0c0842

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    const v0, 0x7f0c084f

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    const v0, 0x7f0c0787

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const v0, 0x7f0c085c

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const v0, 0x7f0c0843

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_6

    :cond_0
    :goto_0
    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    move-object v2, v1

    :goto_1
    const-string/jumbo v0, "is_notification"

    invoke-virtual {v3, v0, v8}, Lcom/hyphenate/chat/EMMessage;->getBooleanAttribute(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_a

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMTextMessageBody;

    iget-object v1, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMTextMessageBody;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const v0, 0x7f0c083f

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    if-nez p1, :cond_8

    new-instance v1, Ljava/util/Date;

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v2

    invoke-direct {v1, v2, v3}, Ljava/util/Date;-><init>(J)V

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-static {v1, v2}, Lcom/waiqin365/lightapp/im/utils/h;->a(Ljava/util/Date;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    :cond_1
    :goto_2
    return-object p2

    :cond_2
    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->TXT:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v0, v2, :cond_4

    const-string/jumbo v0, "is_notification"

    invoke-virtual {v3, v0, v8}, Lcom/hyphenate/chat/EMMessage;->getBooleanAttribute(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_3

    const v0, 0x7f0c0840

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    :goto_3
    const-string/jumbo v0, "is_voice_call"

    invoke-virtual {v3, v0, v8}, Lcom/hyphenate/chat/EMMessage;->getBooleanAttribute(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_0

    const v0, 0x7f0c085b

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    const v0, 0x7f0c084b

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    goto :goto_0

    :cond_3
    const v0, 0x7f0c0845

    :try_start_1
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const v0, 0x7f0c085c

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const v0, 0x7f0c0842

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    const v0, 0x7f0c084b

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    const v0, 0x7f0c0843

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_3

    :catch_0
    move-exception v0

    goto :goto_3

    :cond_4
    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->VOICE:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v0, v2, :cond_5

    const v0, 0x7f0c0858

    :try_start_2
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    const v0, 0x7f0c0842

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    const v0, 0x7f0c0859

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    const v0, 0x7f0c0845

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const v0, 0x7f0c085c

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const v0, 0x7f0c0843

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;

    const v0, 0x7f0c085a

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->l:Landroid/widget/ImageView;
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    goto/16 :goto_0

    :catch_1
    move-exception v0

    goto/16 :goto_0

    :cond_5
    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->VIDEO:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v0, v2, :cond_6

    const v0, 0x7f0c0852

    :try_start_3
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->a:Landroid/widget/ImageView;

    const v0, 0x7f0c0842

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    const v0, 0x7f0c084f

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;

    const v0, 0x7f0c0787

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const v0, 0x7f0c085c

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const v0, 0x7f0c0854

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->i:Landroid/widget/TextView;

    const v0, 0x7f0c0855

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->h:Landroid/widget/TextView;

    const v0, 0x7f0c0857

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->g:Landroid/widget/ImageView;

    const v0, 0x7f0c0856

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->j:Landroid/widget/LinearLayout;

    const v0, 0x7f0c0843

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_2

    goto/16 :goto_0

    :catch_2
    move-exception v0

    goto/16 :goto_0

    :cond_6
    sget-object v2, Lcom/hyphenate/chat/EMMessage$Type;->FILE:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v0, v2, :cond_0

    const v0, 0x7f0c0842

    :try_start_4
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    const v0, 0x7f0c0846

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->o:Landroid/widget/TextView;

    const v0, 0x7f0c0847

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->p:Landroid/widget/TextView;

    const v0, 0x7f0c0845

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->c:Landroid/widget/ProgressBar;

    const v0, 0x7f0c085c

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const v0, 0x7f0c0848

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->q:Landroid/widget/TextView;

    const v0, 0x7f0c0844

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->k:Landroid/widget/LinearLayout;

    const v0, 0x7f0c084f

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->b:Landroid/widget/TextView;
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_5

    :goto_4
    const v0, 0x7f0c0843

    :try_start_5
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_3

    goto/16 :goto_0

    :catch_3
    move-exception v0

    goto/16 :goto_0

    :cond_7
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/im/adapter/cs;

    move-object v2, v0

    goto/16 :goto_1

    :cond_8
    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v4

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMConversation;->getAllMessages()Ljava/util/List;

    move-result-object v1

    add-int/lit8 v2, p1, -0x1

    invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v6

    invoke-static {v4, v5, v6, v7}, Lcom/hyphenate/util/DateUtils;->isCloseEnough(JJ)Z

    move-result v1

    if-eqz v1, :cond_9

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_2

    :cond_9
    new-instance v1, Ljava/util/Date;

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v2

    invoke-direct {v1, v2, v3}, Ljava/util/Date;-><init>(J)V

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-static {v1, v2}, Lcom/waiqin365/lightapp/im/utils/h;->a(Ljava/util/Date;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_2

    :cond_a
    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v0

    iget-object v1, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getTag()Ljava/lang/Object;

    move-result-object v0

    if-eqz v0, :cond_f

    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getTag()Ljava/lang/Object;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->a:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_f

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->b:Ljava/lang/String;

    if-eqz v0, :cond_e

    const-string/jumbo v0, ""

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_e

    const-string/jumbo v0, "0"

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_e

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/login/mainview/a;->m(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "face"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, ".jpg?timestamp="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    iget-object v5, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    invoke-static {v1, v5, v0}, Lcom/fiberhome/gaea/client/d/k;->a(Landroid/content/Context;Landroid/widget/ImageView;Ljava/lang/String;)V

    :goto_5
    sget-object v0, Lcom/hyphenate/chat/EMMessage$ChatType;->GroupChat:Lcom/hyphenate/chat/EMMessage$ChatType;

    if-ne v4, v0, :cond_b

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->RECEIVE:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_b

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "_"

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, ""

    array-length v1, v0

    if-le v1, v9, :cond_12

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-static {v1}, Lcom/waiqin365/base/db/offlinedata/m;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/m;

    move-result-object v1

    aget-object v0, v0, v9

    invoke-virtual {v1, v0}, Lcom/waiqin365/base/db/offlinedata/m;->f(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :goto_6
    iget-object v1, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;

    invoke-virtual {v1, v8}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v1, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_b
    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->SEND:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_14

    sget-object v0, Lcom/hyphenate/chat/EMMessage$ChatType;->GroupChat:Lcom/hyphenate/chat/EMMessage$ChatType;

    if-eq v4, v0, :cond_14

    const v0, 0x7f0c085d

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->m:Landroid/widget/TextView;

    const v0, 0x7f0c085e

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->n:Landroid/widget/TextView;

    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->m:Landroid/widget/TextView;

    if-eqz v0, :cond_d

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->isAcked()Z

    move-result v0

    if-eqz v0, :cond_13

    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->n:Landroid/widget/TextView;

    if-eqz v0, :cond_c

    :cond_c
    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->d:Landroid/widget/ImageView;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    :cond_d
    :goto_7
    sget-object v0, Lcom/waiqin365/lightapp/im/adapter/ci;->a:[I

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage$Type;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    :goto_8
    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->direct()Lcom/hyphenate/chat/EMMessage$Direct;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Direct;->SEND:Lcom/hyphenate/chat/EMMessage$Direct;

    if-ne v0, v1, :cond_17

    invoke-virtual {p2, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/bl;

    invoke-direct {v1, p0, p1, v3}, Lcom/waiqin365/lightapp/im/adapter/bl;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;ILcom/hyphenate/chat/EMMessage;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/cf;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/adapter/cf;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    :goto_9
    const v0, 0x7f0c0841

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    if-nez p1, :cond_18

    new-instance v1, Ljava/util/Date;

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v4

    invoke-direct {v1, v4, v5}, Ljava/util/Date;-><init>(J)V

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-static {v1, v3}, Lcom/waiqin365/lightapp/im/utils/h;->a(Ljava/util/Date;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    :goto_a
    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;

    if-eqz v0, :cond_1

    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->f:Landroid/widget/TextView;

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setIncludeFontPadding(Z)V

    goto/16 :goto_2

    :cond_e
    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    const v1, 0x7f020263

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    goto/16 :goto_5

    :cond_f
    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "_"

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    array-length v1, v0

    if-le v1, v9, :cond_11

    aget-object v0, v0, v9

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-static {v1}, Lcom/waiqin365/base/db/offlinedata/m;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/m;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/waiqin365/base/db/offlinedata/m;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v5

    if-nez v5, :cond_10

    const-string/jumbo v5, "0"

    invoke-virtual {v5, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_10

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v5

    iget-object v6, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-virtual {v5, v6}, Lcom/waiqin365/base/login/mainview/a;->m(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v5

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string/jumbo v6, "/"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string/jumbo v6, "/"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string/jumbo v6, "face"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string/jumbo v6, "/"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v5, ".jpg?timestamp="

    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    iget-object v5, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    invoke-static {v1, v5, v0}, Lcom/fiberhome/gaea/client/d/k;->a(Landroid/content/Context;Landroid/widget/ImageView;Ljava/lang/String;)V

    goto/16 :goto_5

    :cond_10
    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    const v1, 0x7f020263

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    goto/16 :goto_5

    :cond_11
    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    const v1, 0x7f020263

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    goto/16 :goto_5

    :cond_12
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->a:Ljava/lang/String;

    goto/16 :goto_6

    :cond_13
    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->n:Landroid/widget/TextView;

    if-eqz v0, :cond_d

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->isDelivered()Z

    move-result v0

    if-eqz v0, :cond_d

    goto/16 :goto_7

    :cond_14
    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Type;->TXT:Lcom/hyphenate/chat/EMMessage$Type;

    if-eq v0, v1, :cond_15

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getType()Lcom/hyphenate/chat/EMMessage$Type;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Type;->LOCATION:Lcom/hyphenate/chat/EMMessage$Type;

    if-ne v0, v1, :cond_d

    :cond_15
    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->isAcked()Z

    move-result v0

    if-nez v0, :cond_d

    sget-object v0, Lcom/hyphenate/chat/EMMessage$ChatType;->GroupChat:Lcom/hyphenate/chat/EMMessage$ChatType;

    if-eq v4, v0, :cond_d

    const-string/jumbo v0, "is_voice_call"

    invoke-virtual {v3, v0, v8}, Lcom/hyphenate/chat/EMMessage;->getBooleanAttribute(Ljava/lang/String;Z)Z

    move-result v0

    if-nez v0, :cond_d

    :try_start_6
    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v0

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v1, v5}, Lcom/hyphenate/chat/EMChatManager;->ackMessageRead(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x1

    invoke-virtual {v3, v0}, Lcom/hyphenate/chat/EMMessage;->setAcked(Z)V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_4

    goto/16 :goto_7

    :catch_4
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto/16 :goto_7

    :pswitch_0
    invoke-direct {p0, v3, v2, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V

    goto/16 :goto_8

    :pswitch_1
    const-string/jumbo v0, "is_voice_call"

    invoke-virtual {v3, v0, v8}, Lcom/hyphenate/chat/EMMessage;->getBooleanAttribute(Ljava/lang/String;Z)Z

    move-result v0

    if-nez v0, :cond_16

    invoke-direct {p0, v3, v2, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->a(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;I)V

    goto/16 :goto_8

    :cond_16
    invoke-direct {p0, v3, v2, p1}, Lcom/waiqin365/lightapp/im/adapter/bk;->b(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;I)V

    goto/16 :goto_8

    :pswitch_2
    invoke-direct {p0, v3, v2, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->e(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V

    goto/16 :goto_8

    :pswitch_3
    invoke-direct {p0, v3, v2, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->c(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V

    goto/16 :goto_8

    :pswitch_4
    invoke-direct {p0, v3, v2, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->b(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V

    goto/16 :goto_8

    :pswitch_5
    invoke-direct {p0, v3, v2, p1, p2}, Lcom/waiqin365/lightapp/im/adapter/bk;->d(Lcom/hyphenate/chat/EMMessage;Lcom/waiqin365/lightapp/im/adapter/cs;ILandroid/view/View;)V

    goto/16 :goto_8

    :cond_17
    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/cj;

    invoke-direct {v1, p0, v4, v3}, Lcom/waiqin365/lightapp/im/adapter/cj;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/chat/EMMessage$ChatType;Lcom/hyphenate/chat/EMMessage;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, v2, Lcom/waiqin365/lightapp/im/adapter/cs;->e:Landroid/widget/ImageView;

    new-instance v1, Lcom/waiqin365/lightapp/im/adapter/ck;

    invoke-direct {v1, p0, v4, v3}, Lcom/waiqin365/lightapp/im/adapter/ck;-><init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/chat/EMMessage$ChatType;Lcom/hyphenate/chat/EMMessage;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    goto/16 :goto_9

    :cond_18
    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v4

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->f:Lcom/hyphenate/chat/EMConversation;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMConversation;->getAllMessages()Ljava/util/List;

    move-result-object v1

    add-int/lit8 v6, p1, -0x1

    invoke-interface {v1, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v6

    invoke-static {v4, v5, v6, v7}, Lcom/hyphenate/util/DateUtils;->isCloseEnough(JJ)Z

    move-result v1

    if-eqz v1, :cond_19

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_a

    :cond_19
    new-instance v1, Ljava/util/Date;

    invoke-virtual {v3}, Lcom/hyphenate/chat/EMMessage;->getMsgTime()J

    move-result-wide v4

    invoke-direct {v1, v4, v5}, Ljava/util/Date;-><init>(J)V

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/adapter/bk;->g:Landroid/content/Context;

    invoke-static {v1, v3}, Lcom/waiqin365/lightapp/im/utils/h;->a(Ljava/util/Date;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_a

    :catch_5
    move-exception v0

    goto/16 :goto_4

    :catch_6
    move-exception v0

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public getViewTypeCount()I
    .locals 1

    const/16 v0, 0xf

    return v0
.end method
